[]
Adds the specified item to the collection.
public static Task<int> AddAsync<T>(this IDataCollection<T> dataCollection, T item, CancellationToken cancellationToken = default) where T : class?
Public Shared Function AddAsync(Of T As Class)(dataCollection As IDataCollection(Of T), item As T, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Integer)
| Type | Name | Description |
|---|---|---|
| IDataCollection<T> | dataCollection | The data collection. |
| T | item | The item to be added. |
| CancellationToken | cancellationToken | The cancellation token. |
| Type | Description |
|---|---|
| Task<int> |
| Name | Description |
|---|---|
| T |
Adds the specified item to the collection.
public static Task<int> AddAsync<T>(this IDataCollection<T> dataCollection, T item) where T : class?
Public Shared Function AddAsync(Of T As Class)(dataCollection As IDataCollection(Of T), item As T) As Task(Of Integer)
| Type | Name | Description |
|---|---|---|
| IDataCollection<T> | dataCollection | The data collection. |
| T | item | The item to be added. |
| Type | Description |
|---|---|
| Task<int> |
| Name | Description |
|---|---|
| T |